Optimal. Leaf size=25 \[ -\frac{i a^3}{d (a-i a \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0372104, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3487, 32} \[ -\frac{i a^3}{d (a-i a \tan (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3487
Rule 32
Rubi steps
\begin{align*} \int \cos ^2(c+d x) (a+i a \tan (c+d x))^2 \, dx &=-\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \frac{1}{(a-x)^2} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac{i a^3}{d (a-i a \tan (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.0535852, size = 31, normalized size = 1.24 \[ -\frac{i a^2 (\cos (c+d x)+i \sin (c+d x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.047, size = 73, normalized size = 2.9 \begin{align*}{\frac{1}{d} \left ( -{a}^{2} \left ( -{\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) -i{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{2}+{a}^{2} \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.64713, size = 43, normalized size = 1.72 \begin{align*} \frac{a^{2} \tan \left (d x + c\right ) - i \, a^{2}}{{\left (\tan \left (d x + c\right )^{2} + 1\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.35485, size = 46, normalized size = 1.84 \begin{align*} -\frac{i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.298465, size = 37, normalized size = 1.48 \begin{align*} \begin{cases} - \frac{i a^{2} e^{2 i c} e^{2 i d x}}{2 d} & \text{for}\: 2 d \neq 0 \\a^{2} x e^{2 i c} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19159, size = 23, normalized size = 0.92 \begin{align*} -\frac{i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]